package com.wbao.dianniu.utils;

/**
 * 回复@功能处理类
 * <p>
 * Created by Administrator on 2017/8/29.
 */

public class ReplyHelper {

    public static ReplyHelper instance;
    public ReplyListener mListener = null;

    public static ReplyHelper getInstance() {
        if (null == instance) {
            instance = new ReplyHelper();
        }
        return instance;
    }

    public interface ReplyListener {
        void reply(String userName, int userId, int pid);

    }

    public void addReplyListener(ReplyListener listener) {
        mListener = listener;
    }

    public void removeReplyListener(ReplyListener listener) {
        mListener = null;
    }

    public void reply(String userName, int accountId, int pid) {
        if (null != mListener) {
            mListener.reply(userName, accountId, pid);
        }

    }


}
